﻿

alter PROCEDURE [PomAddressSelectByPomplingAddressID ]
(
	@pPomplingAddressID INT
)
AS
BEGIN	
	SET NOCOUNT ON;
	SELECT a.PomplingAddressID, a.AddressLine1, a.AddressLine2, a.City, a.County, a.Postcode,wp.[DateAdded],wp.PropertyType,
	wp.[NumberOfBedrooms],[ShortDescription],[LongDescription],a.DateAdded, rp.[PricePerCalendarMonth],rp.[Furnished]
		FROM [PomPomplingAddresses] a
		LEFT JOIN [PomWebProperties] wp ON a.PomplingAddressID = wp.PomplingAddressID 
		LEFT JOIN [PomRentalProperties] rp ON a.PomplingAddressID = rp.PomplingAddressID
		WHERE a.PomplingAddressID = @pPomplingAddressID AND a.Visible = 1 AND Archived = 0
END


